package com.shrct.businessprocess.purchase.impl;

import com.shrct.businessprocess.purchase.RCIdentifiableProductInStockEvent;
import com.shrct.businessprocess.purchase.impl.RCProductInStockEventImpl;
import com.shrct.businessprocess.purchase.proxy.RCIdentifiableProductInStockEventProxy;
import edu.fudan.mylang.pf.IObjectFactory;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;

@Entity
@DiscriminatorValue("RCIDENTIFIABLEPRODUCTINSTOCKEVENT_TYPE")
public class RCIdentifiableProductInStockEventImpl extends RCProductInStockEventImpl implements RCIdentifiableProductInStockEvent {
  public RCIdentifiableProductInStockEventImpl() {
    super();
  }
  
  public static RCIdentifiableProductInStockEvent create(final IObjectFactory objectFactory) {
    com.shrct.businessprocess.purchase.RCIdentifiableProductInStockEvent rCIdentifiableProductInStockEvent = new com.shrct.businessprocess.purchase.impl.RCIdentifiableProductInStockEventImpl(
    );
    objectFactory.create(rCIdentifiableProductInStockEvent);
    return rCIdentifiableProductInStockEvent;			
    
  }
  
  public static RCIdentifiableProductInStockEvent createRCIdentifiableProductInStockEventImpl(final IObjectFactory objectFactory, final Procedure1<RCIdentifiableProductInStockEvent> init) {
    com.shrct.businessprocess.purchase.RCIdentifiableProductInStockEvent rCIdentifiableProductInStockEvent = new com.shrct.businessprocess.purchase.impl.RCIdentifiableProductInStockEventImpl(
    );
    objectFactory.create(rCIdentifiableProductInStockEvent);
    init.apply(rCIdentifiableProductInStockEvent);
    
    return rCIdentifiableProductInStockEvent;			
    
  }
  
  public RCIdentifiableProductInStockEventProxy toProxy() {
    com.shrct.businessprocess.purchase.proxy.RCIdentifiableProductInStockEventProxy proxy = new com.shrct.businessprocess.purchase.proxy.RCIdentifiableProductInStockEventProxy();
    proxy.setId(this.getId());
    if(this instanceof edu.fudan.mylang.pf.INamedModelObject){
    	proxy.setName(((edu.fudan.mylang.pf.INamedModelObject)this).getEntityName());
    }
    return proxy;
    
  }
}
